package com.google.android.material.appbar;

import android.view.View;
import b.f.l.s;

class d {

    /* renamed from: a  reason: collision with root package name */
    private final View f2156a;

    /* renamed from: b  reason: collision with root package name */
    private int f2157b;

    /* renamed from: c  reason: collision with root package name */
    private int f2158c;

    /* renamed from: d  reason: collision with root package name */
    private int f2159d;
    private int e;
    private boolean f = true;
    private boolean g = true;

    public d(View view) {
        this.f2156a = view;
    }

    /* access modifiers changed from: package-private */
    public void a() {
        View view = this.f2156a;
        s.R(view, this.f2159d - (view.getTop() - this.f2157b));
        View view2 = this.f2156a;
        s.Q(view2, this.e - (view2.getLeft() - this.f2158c));
    }

    public int b() {
        return this.f2157b;
    }

    public int c() {
        return this.f2159d;
    }

    /* access modifiers changed from: package-private */
    public void d() {
        this.f2157b = this.f2156a.getTop();
        this.f2158c = this.f2156a.getLeft();
    }

    public boolean e(int i) {
        if (!this.g || this.e == i) {
            return false;
        }
        this.e = i;
        a();
        return true;
    }

    public boolean f(int i) {
        if (!this.f || this.f2159d == i) {
            return false;
        }
        this.f2159d = i;
        a();
        return true;
    }
}
